function Encode-Url([string]$BaseUrl, [hashtable]$Parameters)
{
    $BaseUrl = $BaseUrl.TrimEnd("/")
    # 遍历$postData哈希表的每个键，对每个键的值进行URL编码，并将编码后的键值对以"key=value"的形式连接起来，键值对之间用'&'分隔
    $queryString = ($Parameters.Keys | ForEach-Object {
        "$($_)=$([System.Net.WebUtility]::UrlEncode($Parameters[$_]))"
    }) -join '&'

    return $BaseUrl + "?" + $queryString
}

function Encode-Parameters([hashtable]$Parameters)
{
     # 遍历$postData哈希表的每个键，对每个键的值进行URL编码，并将编码后的键值对以"key=value"的形式连接起来，键值对之间用'&'分隔
    $queryString = ($Parameters.Keys | ForEach-Object {
        "$($_)=$([System.Net.WebUtility]::UrlEncode($Parameters[$_]))"
    }) -join '&'

    return $queryString;
}

function Encode-String([string]$Value){
    return [System.Net.WebUtility]::UrlEncode($Value)
}

function Encode-FromBase8String([string]$Value, [string]$SplitSymbol)
{

    [string]$regexString;

    if ($SplitSymbol -eq "\")
    {
         $regexString = "(\\[0-9]{1,3}){3}";
    }
    else
    {
        $regexString = "($($SplitSymbol)[0-9]{1,3}){3}";
    }

    $regex = [System.Text.RegularExpressions.Regex]::new($regexString)

    $result = $regex.Replace($Value,[System.Text.RegularExpressions.MatchEvaluator]{
       param($matchValue)
       $trimValue = $matchValue.Value.TrimStart($SplitSymbol)
       $values =  $trimValue.Split($SplitSymbol)
       $bytes = [System.Collections.Generic.List[System.Byte]]::new()
       $bytes.Add([System.Convert]::ToByte($values[0], 8))
       $bytes.Add([System.Convert]::ToByte($values[1], 8))
       $bytes.Add([System.Convert]::ToByte($values[2], 8))
       $byteArray = [System.Linq.Enumerable]::ToArray($bytes)
       $charValue = [System.Text.Encoding]::UTF8.GetString($byteArray)
       return $charValue;
    })

    Write-Host $result.GetType().FullName
    Write-Host $result
}